<template>
  <view class="annex">
    <Pdf :list="dataList" />
  </view>
</template>
<script setup>
import { ref, onMounted } from "vue";
import Pdf from "@/components/PdfList/PdfList.vue";
import { getWorkOrderAnnex } from "@/request/order.js";

const props = defineProps({
  info: {
    type: Object,
    default: () => {},
  },
});

const dataList = ref([]); // 附件列表

onMounted(() => {
  getList();
});

// 获取附件列表
const getList = () => {
  getWorkOrderAnnex(props.info?.id).then((res) => {
    if (res.code == 200) {
      dataList.value = res.data;
    }
  });
};
</script>
<style lang="scss" scoped>
.annex {
  padding: 20rpx;
}
</style>
